package cn.bdqn.service;

import java.util.List;

import cn.bdqn.pojo.News;
import cn.bdqn.service.impl.NewsServiceImpl;

public class TestNewsService {
	
	public static void main(String[] args) {
		
		NewsService newsService = new NewsServiceImpl();
		
//		News news = new News();
//		news.setId(2);
//		newsService.delete(news);
		
		News news = new News();
		news.setTitle("标题");
		news.setCategoryId(2);
		System.out.println("新闻信息表 count--> " + newsService.getNewsCount(news));
		int pageNo = 1;
		int pageSize = 2;
		
		List<News> newsList = newsService.getPageNewsList(pageNo, pageSize,news);
		
		for(News _news : newsList){
			System.out.println("news---> " + _news.getTitle());
		}
		
	}
}
